﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace KM.Controllers.Admin
{
    public class UserController : Controller
    {
        //
        // GET: /User/

        public ActionResult LogIn()
        {
            return View();
        }
        [HttpPost]
        public ActionResult LogIn(FormCollection collectio)
        {
            string username = collectio["username"].ToString();
            if (username == "admin")
            {
                Session["UserId"] = "1";
                return Redirect("/KMAdmin");
            }
            return View();
        }
    }
}
